package com.bwie.controller;

import com.bwie.service.MyService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/day4")
public class MyPoolController {
    @Autowired
    private MyService myService;
    @PostMapping("/sendMessage/{message}")
    public R sendMessage(
        @PathVariable("message") String message
    ){
        myService.sendMessage(message);
        return R.OK();
    }
}
